home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / chat / 12 / 12.exe / SYSTEM / EVENTS2.MRC < prev    next >
Encoding:
Text File  |  2000-03-01  |  13.6 KB  |  340 lines

  1. raw *:* {
  2.   if (%rawreveal == on) {
  3.     if ($window(@RawáReveal) == $null) window -a @RawáReveal
  4.     echo @RawáReveal $nick $+ : $numeric $1-
  5.   }
  6. }
  7. on 1:SERVERMODE:# {
  8.   if (%netsplit == on) {
  9.     if ($form(other,splitrejoin)) iecho $readini %formats other splitrejoin
  10.     else iecho Netsplit rejoin detected on $hc($nick) at $hc($atime) $+ .
  11.   }
  12. }
  13. on 1:SERVEROP:# {
  14.   if (%netsplit == on) {
  15.     if (%splitin != $nick) {
  16.       set %splitin $nick
  17.       if (%netjoin == on) {
  18.         if ($form(other,splitrejoin)) iecho $readini %formats other splitrejoin
  19.         else iecho Netsplit rejoin detected on $hc($nick) at $hc($atime) $+ .
  20.         write -c $tp(wholeft.txt)
  21.         set %netjoin off
  22.         .timer 1 10 set %netjoin on
  23.       }
  24.     }
  25.     unset %split*
  26.     tsound rejoin
  27.   }
  28. }
  29. on 1:DNS {
  30.   if (%dnsevent == off) { unset %dnsevent | return }
  31.   elseif (%spoofchk.nick) {
  32.     if (%spoofchk.chkip != $iaddress) {
  33.       if ($form(other,spoofed)) {
  34.         iecho $readini %formats other spoofed
  35.         if ($form(other,spoofed2)) iecho $readini %formats other spoofed2
  36.         if ($form(other,spoofed3)) iecho $readini %formats other spoofed3
  37.       }
  38.       else {
  39.         iecho $hc(%spoofchk.nick) may have a spoofed hostname.
  40.         iecho $hc(%spoofchk.nick) $+ 's real IP address is $ac(%spoofchk.chkip) $+ .
  41.       }
  42.       if ($com.opchannels(%spoofchk.nick)) {
  43.         set %f11cmd ckb %spoofchk.nick spoofed hostname
  44.         if ($form(other,spoofedkb)) iecho $readini %formats other spoofedkb
  45.         else iecho Press F11 to kickban from all channels.
  46.       }
  47.     }
  48.     else {
  49.       if ($form(other,notspoofed)) iecho $readini %formats other notspoofed
  50.       else iecho $hc(%spoofchk.nick) does not have a spoofed hostname.
  51.     }
  52.     unset %spoofchk*
  53.   }
  54.   elseif (%nickfind == on) {
  55.     unset %nickfind
  56.     if ($naddress) nickfind $naddress
  57.     else nickfind $iaddress 1
  58.   }
  59.   elseif ($raddress == $null) {
  60.     if ($window(@DNS)) {
  61.       if ($form(other,noresolve)) echo @DNS %h $readini %formats other noresolve
  62.       else echo @DNS %h Unable to resolve $hc( [ [ $naddress ] $+ [ $iaddress ] ] )
  63.       echo @DNS á
  64.     }
  65.     else {
  66.       if ($form(other,noresolve)) iecho $readini %formats other noresolve
  67.       else iecho Unable to resolve $hc( [ [ $naddress ] $+ [ $iaddress ] ] )
  68.     }
  69.   }
  70.   else {
  71.     if ($window(@DNS)) {
  72.       if ($form(other,resolve)) echo @DNS %h $readini %formats other resolve
  73.       else echo @DNS %h Resolved $hc($iaddress) to $hc($naddress)
  74.       echo @DNS á
  75.     }
  76.     else {
  77.       if (%copydns == on) clipboard $iaddress
  78.       if ($form(other,resolve)) iecho $readini %formats other resolve
  79.       else iecho Resolved $hc($iaddress) to $hc($naddress)
  80.     }
  81.   }
  82. }
  83. on 1:CHAT:Enter your password. {
  84.   if ((%botautopass == on) && (($chkflag($usr($nick),*,b)) && ($botpass($usr($nick))))) .msg =$nick $botpass($usr($nick))
  85. }
  86. on 1:TOPIC:# {
  87.   tsound topic
  88. }
  89. on 1:NICK {
  90.   if ($nick == $me) tsound nick
  91. }
  92. on 1:PART:# {
  93.   if (%autocycle == on) .timer 1 0 doquitcheck
  94.   if ($chan == %idlechan) {
  95.     timoff %idlectimer idlectimer
  96.     if ($exists($chan($chan).logfile)) .timer 1 0 .remove $chan($chan).logfile
  97.   }
  98. }
  99. on 1:FILERCVD:* {
  100.   var %a = 1, %z = ircN.dccstatus
  101.   if ($dialog(%z)) .timer 1 0 dstat -u
  102.   tsound fileget
  103.   while ($get(%a)) {
  104.     if (($nick == $get(%a)) && ($nopath($filename) == $get(%a).file)) break
  105.     inc %a
  106.   }
  107.  
  108.   if ($get(%a) == $null) return
  109.   if ($get(%a).cps == n/a) return
  110.   if ($form(dcc,getdone)) iecho $readini %formats dcc getdone
  111.   else iecho $hc($filename) $rbrk($alof($file($filename).size)) received from $u($hc($nick)) in $iduration($get(%a).secs) ( $+ $kps($get(%a).cps) $+ kb/s) [open-F11/goto-F12/delete-sF3]
  112.   set %f11cmd run $filename
  113.   set %f12cmd run $nofile($filename)
  114.   set %sf3cmd remove $filename
  115. }
  116. on 1:FILESENT:* {
  117.   var %a = 1, %z = ircN.dccstatus
  118.   if ($dialog(%z)) .timer 1 0 dstat -u
  119.   tsound filesent
  120.   while ($send(%a)) {
  121.     if (($nick == $send(%a)) && ($nopath($filename) == $send(%a).file)) break
  122.     inc %a
  123.   }
  124.   if ($send(%a) == $null) return
  125.   if ($send(%a).cps == n/a) return
  126.   if ($form(dcc,send-done)) iecho $readini %formats dcc send-done
  127.   else iecho $hc($filename) $rbrk($alof($file($filename).size)) sent to $u($hc($nick)) in $iduration($send(%a).secs) ( $+ $kps($send(%a).cps) $+ kb/s)
  128. }
  129. on @1:JOIN:# {
  130.   if ((%clonescan == on) && ($ialchan($address($nick,2),$chan,2)) && ($isvalidchan(%clonechannels,$chan))) {
  131.     set %clone1 $ialchan($address($nick,2),$chan,1).nick
  132.     set %clone2 $ialchan($address($nick,2),$chan,2).nick
  133.     if ((%clone1 != $null) && (%clone2 != $null)) {
  134.       if (($ulevel >= 40) && (%clusrkick != on)) return
  135.       if ((%clopkick != on) && ((%clone1 isop $chan) || (%clone2 isop $chan))) return
  136.       if (%clonelevel < 3) {
  137.         set %clonenicks $sc(%clone1) and $sc(%clone2)
  138.         iiecho . $+ $str(-,50) $+ .
  139.         iiecho $vl ALERT! type $fix(36,clones) $vl
  140.         iiecho $vl $+ $str(-,50) $+ $vl
  141.         iiecho $vl Nicks: $fix(42,%clonenicks) $+ $vl
  142.         iiecho $vl Host: $fix(43,$address($nick,2)) $+ $vl
  143.         iiecho $vl F11: kick $fix(39,%clonenicks) $+ $vl
  144.         iiecho $vl F12: kickban $fix(36,%clonenicks) $+ $vl
  145.         iiecho ' $+ $str(-,50) $+ '
  146.         set %f11cmd fk $chan $address($nick,2) Clone Kick of $address($nick,2)
  147.         set %f12cmd fkb $chan $address($nick,2) Clone KB of $address($nick,2)
  148.         set %f11 off
  149.         set %f12 off
  150.         .timer 1 7 set %f11 on
  151.         .timer 1 7 set %f12 on
  152.       }
  153.       if (%clonelevel == 2) {
  154.         qnotice %clone1 Clones are not permitted in this channel. If %clone2 is your ghost, please notify an op or part the channel.
  155.         qnotice %clone2 Clones are not permitted in this channel. If %clone1 is your ghost, please notify an op or part the channel.
  156.       }
  157.       elseif (%clonelevel == 3) fk $chan $address($nick,2) Clone AutoKick of $address($nick,2)
  158.       elseif (%clonelevel == 4) fkb $chan $address($nick,2) Clone AutoKB of $address($nick,2)
  159.     }
  160.   }  
  161. }
  162. on @1:DEVOICE:# {
  163.   if (($chkflag($usr($vnick),$chan,f)) && ($chkflag($usr($vnick),$chan,v)) && ($nick != $vnick) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($nick),$chan,b) == $false)) {
  164.     mode $chan +v $vnick
  165.     qnotice $nick Sorry, $b($vnick) is protected.
  166.   }
  167. }
  168. on 1:DEOP:# {
  169.   if (($opnick == $me) && ($nick != $me) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($nick),$chan,b) == $false)) {
  170.     get.bot.ops $chan
  171.     return
  172.   }
  173.   if ($me !isop $chan) return
  174.   if (($chkflag($usr($opnick),*,b)) && (%reopbot == on) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($nick),$chan,b) == $false)) mode $chan +o $opnick
  175.   if (($chkflag($usr($nick),*,b)) && (%botdeop == on)) mode $chan +v $opnick
  176.   if (($chkflag($usr($opnick),$chan,f)) && ($chkflag($usr($opnick),$chan,o)) && ($nick != $opnick) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($nick),$chan,b) == $false)) {
  177.     if (%protdeop == on) mode $chan +o-o $opnick $nick
  178.     else mode $chan +o $opnick
  179.     qnotice $nick Sorry, $b($opnick) is protected.
  180.   }
  181. }
  182. on @1:OP:# {
  183.   if (((%strictops == on) && ($isvalidchan(%strictchans,$chan)) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($opnick),$chan,o) == $false)) || ($chkflag($usr($opnick),$chan,d))) {
  184.     mode $chan -o $opnick
  185.     qnotice $nick Sorry, but $opnick cannot have ops in $chan $+ .
  186.     qnotice $opnick Sorry, but you cannot have ops in $chan $+ .
  187.   }
  188. }
  189. on 1:KICK:# {
  190.   if (%autocycle == on) .timer 1 0 doquitcheck
  191.   if (($me isop $chan) && ($knick != $me)) {
  192.     if (($nick != $me) && (%f12 == on) && (i isin $gettok($chan($chan).mode,1,32))) {
  193.       set %f12 off
  194.       .timer 1 5 set %f12 on
  195.       set %f12cmd invite $knick $chan
  196.       if ($chan != $active) {
  197.         if ($form(other,chankick)) iecho $readini %formats other chankick
  198.         else iecho $hc(KICK) $brkt($chan) $+ : $hc($knick) by $hc($nick) ( $+ $1- $+ )
  199.       }
  200.       if ($form(other,kickinv)) iecho $readini %formats other kickinv
  201.       else iecho To invite $hc($knick) press $hc(F12) $+ .
  202.     }
  203.     elseif (($chkflag($usr($knick),$chan,f)) && ($chkflag($usr($nick),$chan,m) == $false) && ($chkflag($usr($nick),$chan,b) == $false)) {
  204.       .quote invite $knick $chan
  205.       if (%protdeop == on) mode $chan -o $nick
  206.       qnotice $nick Sorry, $b($knick) is protected.
  207.     }
  208.   }
  209.   elseif ($knick == $me) {
  210.     set %f11cmd join $chan
  211.     if ($chan != $active) {
  212.       if ($form(other,kicked)) iecho $readini %formats other kicked
  213.       else iecho $hc(KICK) $brkt($chan) $+ : You were kicked by $hc($nick) ( $+ $1- $+ )
  214.     }
  215.     if ($form(other,kickedjoin)) iecho $readini %formats other kickedjoin
  216.     else iecho To rejoin press $hc(F11) $+ .
  217.     set %jointime $ticks
  218.     tsound kicked
  219.   }
  220. }
  221. on 1:ACTION:*:? {
  222.   set %msgrec * * $+ $nick $+ ( $+ $address $+ )* $1-
  223.   set %lsmsg $nick
  224.   if ($away) {
  225.     if (%clsmsg == on) .timer 1 1 close -m $nick
  226.     if (%msglog == on) {
  227.       if ($a.msgno($nick) == 0) {
  228.         writeini -n $td(msg.txt) $nick msgno 1
  229.         writeini -n $td(msg.txt) $nick m1 * $nick $strip($1-)
  230.         writeini -n $td(msg.txt) $nick act1 yes
  231.         writeini -n $td(msg.txt) $nick d1 $ctime
  232.       }
  233.       else {
  234.         set %tmp.m $pls(1,$a.msgno($nick))
  235.         writeini -n $td(msg.txt) $nick msgno %tmp.m
  236.         writeini -n $td(msg.txt) $nick m $+ %tmp.m * $nick $strip($1-)
  237.         writeini -n $td(msg.txt) $nick act $+ %tmp.m yes
  238.         writeini -n $td(msg.txt) $nick d $+ %tmp.m $ctime
  239.         unset %tmp.m
  240.       }
  241.       if ($a.numsg == 0) writeini -n $td(msg.txt) messages totalnumsg 1
  242.       else writeini -n $td(msg.txt) messages totalnumsg $pls(1,$a.numsg)
  243.       if ($readini $td(msg.txt) messages $nick == $null) {
  244.         if ($a.numnk) writeini -n $td(msg.txt) messages totalnumnk $pls(1,$a.numnk)
  245.         else writeini -n $td(msg.txt) messages totalnumnk 1
  246.         writeini -n $td(msg.txt) messages $nick yes
  247.         writeini -n $td(msg.txt) messages nicknumber $+ [ $a.numnk ] $nick
  248.       }
  249.       writeini -n $td(msg.txt) $nick ldate $ctime
  250.       writeini -n $td(msg.txt) $nick addy $address
  251.       writeini -n $td(msg.txt) messages lastrecnick $nick
  252.       writeini -n $td(msg.txt) messages lastrecmsg $strip($1-)
  253.       writeini -n $td(msg.txt) messages lastrecaddy $address
  254.       writeini -n $td(msg.txt) messages lastrecdate $ctime
  255.       tb
  256.     }
  257.     if ($findtok(%knowaway,$nick,1,44) == $null) {
  258.       set %knowaway $addtok(%knowaway,$nick,44)
  259.       qnotice $nick Your message has been recorded, away for $gone ( $+ $b(%awaymsg) $+ ) $e-mail($email) $uin(%uin)
  260.     }
  261.   }
  262.   tsound msg
  263. }
  264. on 1:TEXT:*:? {
  265.   if ((%decrypt == on) && ($1 == ]) && ($2 != $null)) {
  266.     crypt 1 %encryptpw $2-
  267.     echo -ti2 $nick < $+ $nick $+ : $+ $hc(crypt) $+ : $+ $sc(%encryptpw) $+ > $result
  268.   }
  269.   set %msgrec * $+ $nick $+ ( $+ $address $+ )* $1-
  270.   set %lsmsg $nick
  271.   if ($away) {
  272.     if (%clsmsg == on) .timer 1 1 close -m $nick
  273.     if (%msglog == on) {
  274.       if ($a.msgno($nick) == 0) {
  275.         writeini -n $td(msg.txt) $nick msgno 1
  276.         writeini -n $td(msg.txt) $nick m1 $strip($1-)
  277.         writeini -n $td(msg.txt) $nick d1 $ctime
  278.       }
  279.       else {
  280.         set %tmp.m $pls(1,$a.msgno($nick))
  281.         writeini -n $td(msg.txt) $nick msgno %tmp.m
  282.         writeini -n $td(msg.txt) $nick m $+ %tmp.m $strip($1-)
  283.         writeini -n $td(msg.txt) $nick d $+ %tmp.m $ctime
  284.         unset %tmp.m
  285.       }
  286.       if ($a.numsg == 0) writeini -n $td(msg.txt) messages totalnumsg 1
  287.       else writeini -n $td(msg.txt) messages totalnumsg $pls(1,$a.numsg)
  288.       if ($readini $td(msg.txt) messages $nick  == $null) {
  289.         if ($a.numnk) writeini -n $td(msg.txt) messages totalnumnk $pls(1,$a.numnk)
  290.         else writeini -n $td(msg.txt) messages totalnumnk 1
  291.         writeini -n $td(msg.txt) messages $nick yes
  292.         writeini -n $td(msg.txt) messages nicknumber $+ [ $a.numnk ] $nick
  293.       }
  294.       writeini -n $td(msg.txt) $nick ldate $ctime
  295.       writeini -n $td(msg.txt) $nick addy $address
  296.       writeini -n $td(msg.txt) messages lastrecnick $nick
  297.       writeini -n $td(msg.txt) messages lastrecmsg $strip($1-)
  298.       writeini -n $td(msg.txt) messages lastrecaddy $address
  299.       writeini -n $td(msg.txt) messages lastrecdate $ctime
  300.       tb
  301.     }
  302.     if ($findtok(%knowaway,$nick,1,44) == $null) {
  303.       set %knowaway $addtok(%knowaway,$nick,44)
  304.       qnotice $nick Your message has been recorded, away for $gone ( $+ $b(%awaymsg) $+ ) $e-mail($email) $uin(%uin)
  305.     }
  306.   }
  307.   tsound msg
  308. }
  309. on 1:NOTICE:*:? {
  310.   set %notrec - $+ $nick $+ ( $+ $address $+ )- $1-
  311.   tsound notice
  312. }
  313. on @40:TEXT:*:# {
  314.   if ($nick isop $chan) return
  315.   if (($chkflag($usr($nick),$chan,o)) && ($chkflag($usr($nick),$chan,a))) mode $chan +o $nick
  316.   if ($nick isvo $chan) return
  317.   if ($chkflag($usr($nick),$chan,v)) mode $chan +v $nick
  318. }
  319. on +@20:TEXT:*:# {
  320.   if ($sd($nick,$chan)) {
  321.     set %tmp $readini -n bans.ini $ulist($fulladdress,20,1) reason
  322.     .quote mode $chan +b $ulist($fulladdress,20,1) $+ $crlf $+ kick $chan $nick :banned: $deltok(%tmp,1,32)
  323.   }
  324. }
  325. on @40:ACTION:*:# {
  326.   if ($nick isop $chan) return
  327.   if (($chkflag($usr($nick),$chan,o)) && ($chkflag($usr($nick),$chan,a))) mode $chan +o $nick
  328.   if ($nick isvo $chan) return
  329.   if ($chkflag($usr($nick),$chan,v)) mode $chan +v $nick
  330. }
  331. on +@20:ACTION:*:# {
  332.   if ($sd($nick,$chan)) {
  333.     set %tmp $readini -n users.ini $ulist($fulladdress,20,1) reason
  334.     .quote mode $chan +b $ulist($fulladdress,20,1) $+ $crlf $+ kick $chan $nick :banned: $deltok(%tmp,1,32)
  335.   }
  336. }
  337. menu @Whois {
  338.   exit { set %whloc $swlc(@Whois) | window -c @Whois }
  339. }
  340.